home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d902.lha / Less / Source / source.lha / regexp.h < prev    next >
C/C++ Source or Header  |  1991-08-10  |  987b  |  42 lines

  1. /*
  2.  * Definitions etc. for regexp(3) routines.
  3.  *
  4.  * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
  5.  * not the System V one.
  6.  */
  7. #ifdef __STDC__
  8. #ifndef __PROTO
  9. #define __PROTO(a) a
  10. #endif
  11. #endif
  12.  
  13. #ifndef __NOPROTO
  14. #ifndef __PROTO
  15. #define __PROTO(a) a
  16. #endif
  17. #else
  18. #ifndef __PROTO
  19. #define __PROTO(a) ()
  20. #endif
  21. #endif
  22.  
  23. #define NSUBEXP  10
  24. typedef struct regexp {
  25.         char *startp[NSUBEXP];
  26.         char *endp[NSUBEXP];
  27.         char regstart;          /* Internal use only. */
  28.         char reganch;           /* Internal use only. */
  29.         char *regmust;          /* Internal use only. */
  30.         int regmlen;            /* Internal use only. */
  31.         char program[1];        /* Unwarranted chumminess with compiler. */
  32. } regexp;
  33.  
  34. /* Prototypes for functions defined in regexp.c */
  35.  
  36. regexp *regcomp __PROTO((char *exp));
  37. int regexec __PROTO((register regexp *prog,
  38.                      register char *string));
  39.  
  40. extern void regsub();
  41. extern void regerror();
  42.